<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
.pres{
    border: 1px dashed #000;
    background-color: #f0f0f0;
    color: #008000;
}
.pres span{
    color: #99a4b0;
}
</style>
<body>
    <pre class="pres">

        &lt;script type=&quot;text/javascript&quot;&gt;
             alert(typeof 123456);            <span>//输出number</span>
             alert(typeof &quot;abc&quot;);           <span>//输出string</span>   
            alert(typeof document);           <span>//输出object</span> 
        &lt;/script&gt;

    </pre>
</body>
<script>
    alert('typeof 123456 --'+typeof 123456 + "\n typeof 'abc' --"+ typeof 'abc' +"\n typeof document--"+typeof document) 
</script>
</html>